package com.wuyi.service.impl;

import com.wuyi.mapper.CategoryMapper;
import com.wuyi.pojo.Category;
import com.wuyi.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 曾川
 * @version 1.0.0
 * @ClassName CategoryServiceImpl.java
 * @Description 分类实现类
 * @createTime 2021年11月03日 19:47:00
 */
@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    private CategoryMapper categoryMapper;

    @Transactional( propagation = Propagation.SUPPORTS)
    @Override
    public List<Category> list() {
        return categoryMapper.selectAll();
    }
}
